package cn.edu.ctbu.thymeleafwork.repository;

import cn.edu.ctbu.thymeleafwork.domain.Student;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StudentRepository extends JpaRepository<Student,Integer> {
    List<Student> findAll();
    Page<Student> findByName(String name, Pageable pageable);

    List<Student> findByNameLike(String name);
    Student findById(Long id);
}
